﻿using Abp.Application.Services;
using Abp.Application.Services.Dto;
using MyCompanyName.AbpZeroTemplate.Agent.Dto;
using MyCompanyName.AbpZeroTemplate.Authorization.Users;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyCompanyName.AbpZeroTemplate.Agent
{
    public interface IAgentService: IApplicationService
    {
        /// <summary>
        /// 根据代理商名称获得用户的信息
        /// </summary>
        /// <param name="AccountCode"></param>
        /// <returns></returns>
        User GetUserIdByAgentCode(string AgentCode);

        /// <summary>
        /// 根据账号获取信息
        /// </summary>
        /// <param name="Account"></param>
        /// <returns></returns>
        AgentDto GetAgentByAgentCode(string agentCode);

        /// <summary>
        /// 根据当前用户获得该用户的下级代理商
        /// </summary>
        /// <returns></returns>
        List<string> GetAgentCodeByCurrentUser();

        /// <summary>
        /// 获得代理商列表
        /// </summary>
        /// <returns></returns>
        PagedResultDto<AgentDto> GetAgentDtoList(string AgentName, int PageSize, int PageNumber);

        /// <summary>
        /// 创建代理商
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        int CreateAgent(CreateAgentInput input);
        /// <summary>
        /// 更新代理商
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        bool UpdateAgent(UpdateAgentInput input);

        /// <summary>
        /// 删除代理商
        /// </summary>
        /// <param name="AgentId"></param>
        /// <returns></returns>
        bool DeleteAgent(int AgentId);

        /// <summary>
        /// 根据代理商主键id获得代理商信息
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        AgentDto GetAgentById(int Id);


        /// <summary>
        /// 获得代理商转账记录列表
        /// </summary>
        /// <returns></returns>
        PagedResultDto<AgentTransferDto> GetAgentTransferDtoList(string AgentTransferName,int PageSize, int PageNumber);

        /// <summary>
        /// 创建经销商转账记录,更新代理商信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        string CreateAgentTransfer(CreateAgentTransferInput input);

        /// <summary>
        /// 获得代理商充值记录列表
        /// </summary>
        /// <returns></returns>
        PagedResultDto<AgentRechargeDto> GetAgentRechargeDtoList(string AgentRechargeName, int PageSize, int PageNumber);

        /// <summary>
        /// 创建经销商充值记录,更新代理商信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        string CreateAgentRecharge(CreateAgentRechargeInput input);
    }
}
